<head>
	<meta name="viewport" content="width=device-width" />
	<script src="../jquery.js" type="text/javascript" charset="utf-8"></script>	
	<script type="text/javascript" charset="utf-8">
		function setOrientation() {
			var orientation = (window.innerWidth < window.innerHeight) ? 'portrait' : 'landscape';
			$("#orientation").html(orientation);
		}
		$(document).ready(function(){
			setOrientation();
			$("body").bind("orientationchange", function(event){
				setOrientation();
			})
		})
	</script>
</head>
<body>
Current orientation: <span id="orientation"></span>
</body>